#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_flask0.py
# author:Jackiex
# datetime:2023/5/22 10:52
# software: PyCharm

"""
 基于Flask web框架来进行web开发
 pip install flask
"""

from flask import Flask

app = Flask(__name__)


@app.route('/')
def index():
    return 'hello  flask web!'


@app.route('/myweb')
def myweb():
    return '''
     <html>
    <head>
    <title>Hello</title>
    </head>
    <body>
    <h1>Hello, world!</h1><br><br>
    <a href='/' target="_blank">这个是超链接</a>

    </body>
    </html>      
    
    '''

@app.route('/user/<username>')
def show_user_name(username):
    return 'hello : %s' % username


if __name__ == '__main__':
    app.run(port=5000)
